Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 9174dbd34a8331100c187f5ec6b7ce77b63ca9d3


Parents : 6c82de1
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-01-03T11:54:48+01:00

Board defines for T3S3-SX1280

Changes

3 files changed, 19 insertions(+), 0 deletions(-)

M Boards.h +12
M Makefile +3

Diff

diff --git a/Boards.h b/Boards.h
index d2b4a6f..95856a7 100644
--- a/Boards.h
+++ b/Boards.h
@@ -46,6 +46,7 @@
#define MODEL_A5 0xA5 // RNode v2.2, 433 MHz with SX1278
#define MODEL_A6 0xA6 // RNode v2.2, 868 MHz with SX1262
#define MODEL_AA 0xAA // RNode v2.2, 868 MHz with SX1276
+ #define MODEL_AB 0xAB // RNode v2.2, 2.4 GHz with SX1280
#define PRODUCT_TBEAM 0xE0 // T-Beam devices
#define BOARD_TBEAM 0x33
@@ -437,6 +438,17 @@
const int pin_busy = 34;
const int pin_dio = 33;
const int pin_tcxo_enable = -1;
+ #elif MODEM == SX1280
+ #define DIO2_AS_RF_SWITCH true
+ #define HAS_BUSY true
+ #define HAS_TCXO true
+ #define HAS_PA true
+ const int pa_max_input = 3;
+ const int pin_busy = 36;
+ const int pin_dio = 9;
+ const int pin_tcxo_enable = -1;
+ const int pin_rxen = -1;
+ const int pin_txen = -1;
#else
const int pin_dio = 9;
#endif

diff --git a/Makefile b/Makefile
index 0d0fb51..f562f8c 100644
--- a/Makefile
+++ b/Makefile
@@ -81,6 +81,9 @@ firmware-t3s3:
firmware-t3s3_sx127x:
arduino-cli compile --log --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc" -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x42\" \"-DMODEM=0x01\""
+firmware-t3s3_sx1280:
+ arduino-cli compile --log --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc" -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x42\" \"-DMODEM=0x04\""
+
firmware-tdeck:
arduino-cli compile --log --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc" -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x3B\""

diff --git a/sx128x.cpp b/sx128x.cpp
index ecd87a0..402953d 100644
--- a/sx128x.cpp
+++ b/sx128x.cpp
@@ -683,11 +683,15 @@ void sx128x::disableTCXO() {
}
void sx128x::setTxPower(int level, int outputPin) {
+ #if HAS_PA == true
+ if (level > pa_max_input) { level = pa_max_input; }
+ #else
if (level > 13) {
level = 13;
} else if (level < -18) {
level = -18;
}
+ #endif
_txp = level;


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────